<template>
    <view style="padding: 35rpx;">
       <rich-text :nodes="data.text"></rich-text>
    </view>
</template>
<script>
	//这个是获取说明文件
    export default {
        data() {
            return {
				data:''
            }
        },
		onLoad(e){
			uni.common.post(
				uni.common.apiServer + 'index',
				{
					type: 'get_xiangguan',
					lei:e.src
				},
				true,
				res => {
					if (res.code == 1) {
						uni.setNavigationBarTitle({
						    title:res.data.title
						});
						let shu = res.data.text;
						shu = shu.replace(/src="\/ueditor\//g, 'style="width: 100%;height:auto !important;" src="' + uni.common.nServer + 'ueditor/');
						shu = shu.replace(/<img/g, '<img style="width: 100%;height:auto !important;" ');
						res.data.text=shu
						this.data=res.data
					}else {
						uni.showToast({
							title: '获取失败',
							icon: "none"
						});
					}
				},
				e => {
					console.log(e);
				}
			);
		},
		onShow() {
		}
    }
	
</script>

<style>

</style>